#include "cmealrecipe.h"

using namespace cooking;

CMealRecipe::CMealRecipe(QObject *parent) :
    CObject(parent)
{
//    m_id = KInvalidId;
    m_recipe_id = KInvalidId;
    m_meal_id = KInvalidId;
    m_status = Default;
}

//int CMealRecipe::id() {
//    return m_id;
//}

//void CMealRecipe::setId(int id) {
//    if (m_id != id) {
//        m_id = id;
//        emit idChanged();
//    }
//}

int CMealRecipe::mealId() {
    return m_meal_id;
}

void CMealRecipe::setMealId(int mealId) {
    if (m_meal_id != mealId) {
        m_meal_id = mealId;
        emit mealIdChanged();
    }
}

int CMealRecipe::recipeId() {
    return m_recipe_id;
}

void CMealRecipe::setRecipeId(int recipeId) {
    if (m_recipe_id != recipeId) {
        m_recipe_id = recipeId;
        emit recipeIdChanged();
    }
}

CMealRecipe::RecipeStatus CMealRecipe::status() {
    return m_status;
}

void CMealRecipe::setStatus(CMealRecipe::RecipeStatus status) {
    if (m_status != status) {
        m_status = status;
        emit statusChanged();
    }
}
